1. Field of the Invention
The present invention relates to an image processing apparatus, a method, a program and a recording medium, and an image pickup apparatus, and in particular to a technique of reducing occurrence of color moire.
2. Description of the Related Art
In an image pickup apparatus including a single-element color image pickup element, an output image of the color image pickup element is a RAW image (mosaic image). Accordingly, a multi-channel image is acquired by simultaneous processing (alternatively, referred to as a demosaic process; hereinafter, the same shall apply) that interpolates missing pixels with surrounding pixels.
Japanese Patent Application Laid-Open No. 2011-182354 (PTL 1) describes that an interpolation process is performed with an assumption that color ratios of red (R), green (G) and blue (B) are kept substantially constant in a local area during a demosaic process. For instance, low frequency components mR′, mG and mB′ of R, G and B signals are acquired for 7×7-pixel input pixel units adopting, as a center pixel, a pixel to be subjected to a demosaic process. The pixel values of R and B pixels on a G pixel in the case where the pixel to be processed is the G pixel are estimated as R=(mR′/mG)g and B=(mB′/mG)g on the basis of the pixel value g of the G pixel and color ratios in a local region (mR′/mG, mB′/mG).
The low frequency components mR′, mG and mB′ of R, G and B signals for 7×7-pixel input pixel units are acquired through calculation of a weighted average value by a convolution operation between an RGB signal in 7×7-pixel input pixel units and weighting coefficients where a high weighting coefficients is assigned to the center (FIGS. 24 and 26 in PTL 1).